package com.graduation.rescuematerial.controller.applet;

import com.graduation.rescuematerial.service.CompanyService;
import com.graduation.rescuematerial.vo.RespBean;
import com.graduation.rescuematerial.vo.WarehouseInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author:CaiShuangLian
 * @FileName:
 * @Date:Created in  2022/4/24 19:07
 * @Version:
 * @Description:TODO
 */
@RestController
@RequestMapping("applet/company")
@Api(tags = "Applet——部门模块")
public class AppletCompanyController {

    @Autowired
    private CompanyService companyService;

//    @ApiOperation("添加部门成员")
//    @PostMapping("/add")
//    @ResponseBody
//    @Transactional(rollbackFor = Exception.class)
//    public RespBean addOne(){
//        return null;
//    }

    @ApiOperation("获取仓库列表，距离由近到远排序")
    @ResponseBody
    @PostMapping
    public RespBean getWarehouse(@RequestBody WarehouseInfoVo warehouseInfoVo){
        return companyService.getWarehouse(warehouseInfoVo);
    }

}
